﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    public enum cookRobot
    {
        西红柿炒番茄,
        土豆炒马铃薯
        
    }
   abstract class Robot
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public Robot(string name)
        {
            this.Name = name;
        }
        abstract public void Working();
        
    }
    class CookRobot:Robot
    {

        public cookRobot cook;
        public cookRobot Cook
        {
            get { return cook; }
            set { cook = value; }
        }
        public CookRobot(string name, cookRobot cook):base(name)
        {
            this.Cook = cook;
        }
        public override void Working()
        {
            Console.WriteLine("我是{0},我在{1}",this.Name, this.cook);
        }
    }
    class ChuanRobot : Robot
    {
        private string chuan;
        public string Chuan
        {
            get { return chuan; }
            set { chuan = value; }
        }
        public ChuanRobot(string name,string chuan):base(name)
        {
            this.Chuan = chuan;
        }
        public override void Working()
        {
            Console.WriteLine("我是机器人{0},{1}",this.Name,this.chuan);
        }
    }
}
